<?php

class ConnectDb {
	private $connexion = null ;
	
	static private $instance = null ;
	
	public function getConnexion() {
		if ( $this->connexion == null )
			$this->connexion = new PDO('mysql:host=localhost;dbname=mobilegame', 'root', '');
		
		return $this->connexion ;
	}
	
	static public function getInstance(){
		if ( self::$instance == null ) 
			self::$instance = new ConnectDb();
			
		return self::$instance;
	}
	
}
?>
